<div class="col-12 col-md-4">
  {{form_trigger.measurement.label(class_='control-label')}}
  <div>
    <select class="form-control form-tooltip form-dropdown" id="measurement" name="measurement" style="width: 100%;" title="" data-original-title="{{_('Select the measurement to use as the input')}}">
      <option value="">{{dict_translation['select_one']['title']}}</option>
    {% set edge_sensor = [] %}
    {% for each_input_form in choices_input -%}
      {%- if table_input.query.filter(table_input.unique_id == each_input_form['value'].split(',')[0]).first().device == 'EDGE' -%}
        {% do edge_sensor.append(1) %}
      <option value="{{each_input_form['value'].split(',')[0]}}"{% if each_function.measurement == each_input_form['value'].split(',')[0] %} selected{% endif %}>{{each_input_form['item']}}</option>
      {%- endif -%}
    {% endfor -%}

    {% if not edge_sensor -%}
      <option value="">{{dict_translation['none_available']['title']}}</option>
    {% endif -%}
    </select>
  </div>
</div>
<div class="col-10 col-sm-3 col-md-2">
  {{form_trigger.edge_detected.label(class_='control-label')}}
  <div>
    <select class="form-control form-tooltip form-dropdown" data-placement="top" id="edge_detected" name="edge_detected" title="{{_('Detect low to high (rising), high to low (falling), or both?')}}">
      <option value=""></option>
      <option value="rising"{% if each_function.edge_detected == 'rising' %} selected{% endif %}>{{_('Rising')}}</option>
      <option value="falling"{% if each_function.edge_detected == 'falling' %} selected{% endif %}>{{_('Falling')}}</option>
      <option value="both"{% if each_function.edge_detected == 'both' %} selected{% endif %}>{{_('Both')}}</option>
    </select>
  </div>
</div>
